package com.lsc.www.day01.tt;

public class DataTest02 {

    public static void main(String[] args) {
        //数据类型的转换
        //隐式类型转换
        byte b = 127;
        int a = 100;
        System.out.println(a+b);
        //强制类型转换
        int i = 128;
                    //括号中是你前面定义的类型
        byte b1 = (byte) i;
        System.out.println(b1);



        double d = 3.1415926;
        int i1 = (int) d;
        System.out.println(i1);

        //注意！！强制类型转换会丢失精度

        System.out.println(i+d);

    }
}
